// 单例模板类
#pragma once

#include <iostream>

template<typename T>
class Singleton {
public:
    static T *getInstance() {
        static T instance;
        return &instance;
    }

protected:
    Singleton() {}

    virtual ~Singleton() {
        std::cout << "~Single template class\n";
    }

private:
    Singleton(const Singleton &) = delete;

    Singleton &operator=(const Singleton &) = delete;

    Singleton(Singleton &&) = delete;

    Singleton &operator=(Singleton &&) = delete;
};
